{$CLEO .cs}
0000:


0247: load_model 10558
0247: load_model 5779
0247: load_model 1522
038B: load_requested_models

029B: 1@ = init_object 10558 at 4490.1299 -1837.41 30.4 // LIft
0453: set_object 1@ XY_rotation 0.0 90.0 angle 359.984





029B: 2@ = init_object 5779 at 4591.8301 -2175.8501 120.7 // obje lift 2
0453: set_object 2@ XY_rotation 0.0 90.0 angle 0.0 
029B: 20@ = init_object 1522 at 4396.7402 -2402.6201 9.45 // open south
0453: set_object 20@ XY_rotation 0.0 0.0 angle 270.0 
029B: 21@ = init_object 1522 at 4396.7402 -2402.6699 9.45 // object OPEN 2 north
0453: set_object 21@ XY_rotation 0.0 0.0 angle 90.0
 
0392: make_object 1@ moveable 1
0392: make_object 2@ moveable 1
0392: make_object 20@ moveable 1
0392: make_object 21@ moveable 1

12@ = 0 
32@ = 0 
29@ = 0 
33@ = 0 
:1
while true 
wait 0 
gosub @open_Doors 
//open doors
0AE1: 30@ = random_actor_near_point  4398.7026 -2401.6082 10.5006 in_radius 99999.0 find_next 1 pass_deads 1
if  056D:   actor 30@ defined
then
    if 00FE:   actor 30@ sphere 0 in_sphere 4398.7026 -2401.6082 10.5006 radius 6.0 6.0 3.0
    then
        33@ = 0 
       29@ = 1 
    end  
end 
if  056D:   actor $second_player_actor  defined
then
    if 00FE:   actor $second_player_actor sphere 0 in_sphere 4398.7026 -2401.6082 10.5006 radius 6.0 6.0 3.0
    then
    33@ = 0 
       29@ = 1 
    end  
end 
if 00FE:   actor $player_actor sphere 0 in_sphere 4398.7026 -2401.6082 10.5006 radius 6.0 6.0 3.0
then
    33@ = 0 
   29@ = 1 
end  
   if 12@ == 0 
   then
   034E: move_object 1@ to 4490.1299 -1837.41 30.4  speed 0.0 0.0 0.3 collision_check 0
   034E: move_object 2@ to 5779 at 4591.8301 -2175.8501 120.7  speed 0.0 0.0 0.3 collision_check 0

   end 
   if 12@ == 1  
   then
   034E: move_object 1@ to 4490.1299 -1837.41 75.88   speed 0.0 0.0 0.3 collision_check 0
   034E: move_object 2@ to 4591.8301 -2175.8501 9.48  speed 0.0 0.0 0.3 collision_check 0
   
   end 
   if 
   32@ > 20000
   then
       32@ = 0 
       if 
       12@==0 
       then
       12@=1 
       jump @1
       end 
       if 
       12@==1 
       then
        12@=0 
       jump @1
       end        
   end 
   
end
0A93: end_custom_thread

:open_Doors 
 
if  and
33@ > 3000
29@ == 1
then

29@ = 0 
33@ = 0 
end 
if
29@ == 0  //closed
then
   034E: move_object 20@ to   4396.7402 -2402.6201 9.45  speed 0.0  0.2 0.0 collision_check 0              //south
   034E: move_object 21@ to  4396.7402 -2402.6699 9.45 speed 0.0  0.2 0.0 collision_check 0    //north    -0.3

end
if
29@ == 1 //open
then
   034E: move_object 20@ to   4394.521 -2409.4355 10.4754 speed 0.0  0.1 0.0 collision_check 0              //south     -0.3 
   034E: move_object 21@ to   4394.8838 -2397.1875 10.4754 speed    0.0 0.1 0.0 collision_check 0    //north

end

return 
